package ruanjian.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ruanjian.dao.CDao;
import ruanjian.domain.Customer;
import ruanjian.service.CService;

import java.util.List;
@Service("cService")
public class CServiceImpl  implements CService {
    @Autowired
    public CDao cDao;
    @Override
    public List<Customer> selectCus(){
        List<Customer> customers = cDao.selectCus();
        return customers;
    }

    @Override
    public  int creatCus(Customer customer){
        return cDao.creatCus(customer);
    }
    @Override
    public Customer getCusid(Integer id){
        return cDao.getCusid(id);
    }
    @Override
    public  int updateCus(Customer customer){
        return cDao.updateCus(customer);
    }
    @Override
    public  int deleteCus(Integer id){
        return cDao.deleteCus(id);
    }
}
